package com.mgq.design.create.builder;

/**
 * <b>功能：</b>测试类<br>
 * <b>Copyright mgq</b>
 * <li>版本&nbsp;&nbsp;&nbsp;&nbsp;修改日期&nbsp;&nbsp;&nbsp;&nbsp;部　　门&nbsp;&nbsp;&nbsp;&nbsp;作　者&nbsp;&nbsp;&nbsp;&nbsp;变更内容</li><hr>
 * <li>v1.0&nbsp;&nbsp;&nbsp;&nbsp;20220318&nbsp;&nbsp;营业后台&nbsp;&nbsp;&nbsp;&nbsp;马广奇&nbsp;&nbsp;&nbsp;&nbsp;创建类</li>
 * <br><br>
 *
 * @author 马广奇
 * @version 2022-03-18 10:28
 */
public class Test {
    public static void main(String[] args) {
        Meal vegMeal = MealBuilder.prepareVegMeal();
        System.out.println("vegMeal....");
        vegMeal.showItem();
        System.out.println("总花费:"+vegMeal.getCost());


        System.out.println("--------------------------------");
        Meal nonVegMeal = MealBuilder.prepareNonVegMeal();
        System.out.println("noVegMeal..........");
        nonVegMeal.showItem();
        System.out.println("总花费:"+nonVegMeal.getCost());

        Meal meal = MealBuilder.mealInstance();
        meal.addItem(new PorkBurger());
        meal.addItem(new Coke());

        System.out.println("自定义..........");
        meal.showItem();
        System.out.println("总花费:"+meal.getCost());
    }
}
